package com.asl.website.serviceContent.service.impl;

import java.util.List;
import com.asl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.asl.website.serviceContent.mapper.SysServiceContentMapper;
import com.asl.website.serviceContent.domain.SysServiceContent;
import com.asl.website.serviceContent.service.ISysServiceContentService;

/**
 * 服务内容Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-22
 */
@Service
public class SysServiceContentServiceImpl implements ISysServiceContentService 
{
    @Autowired
    private SysServiceContentMapper sysServiceContentMapper;

    /**
     * 查询服务内容
     * 
     * @param contentId 服务内容主键
     * @return 服务内容
     */
    @Override
    public SysServiceContent selectSysServiceContentByContentId(Long contentId)
    {
        return sysServiceContentMapper.selectSysServiceContentByContentId(contentId);
    }

    /**
     * 查询服务内容列表
     * 
     * @param sysServiceContent 服务内容
     * @return 服务内容
     */
    @Override
    public List<SysServiceContent> selectSysServiceContentList(SysServiceContent sysServiceContent)
    {
        return sysServiceContentMapper.selectSysServiceContentList(sysServiceContent);
    }

    /**
     * 新增服务内容
     * 
     * @param sysServiceContent 服务内容
     * @return 结果
     */
    @Override
    public int insertSysServiceContent(SysServiceContent sysServiceContent)
    {
        sysServiceContent.setCreateTime(DateUtils.getNowDate());
        return sysServiceContentMapper.insertSysServiceContent(sysServiceContent);
    }

    /**
     * 修改服务内容
     * 
     * @param sysServiceContent 服务内容
     * @return 结果
     */
    @Override
    public int updateSysServiceContent(SysServiceContent sysServiceContent)
    {
        sysServiceContent.setUpdateTime(DateUtils.getNowDate());
        return sysServiceContentMapper.updateSysServiceContent(sysServiceContent);
    }

    /**
     * 批量删除服务内容
     * 
     * @param contentIds 需要删除的服务内容主键
     * @return 结果
     */
    @Override
    public int deleteSysServiceContentByContentIds(Long[] contentIds)
    {
        return sysServiceContentMapper.deleteSysServiceContentByContentIds(contentIds);
    }

    /**
     * 删除服务内容信息
     * 
     * @param contentId 服务内容主键
     * @return 结果
     */
    @Override
    public int deleteSysServiceContentByContentId(Long contentId)
    {
        return sysServiceContentMapper.deleteSysServiceContentByContentId(contentId);
    }
}
